/*
 * @Author: yaoling 1871883713@qq.com
 * @Date: 2022-10-20 18:11:21
 * @LastEditors: yaoling 1871883713@qq.com
 * @LastEditTime: 2022-12-06 14:56:09
 * @FilePath: \company-world\src\apis\jurisdiction\Notice.ts
 * @Description: 公告管理接口
 */
import Request from '@/apis/index'
/**
 * @desc: 获取数据
 */
export function getNoticeList(params?: object) {
    return Request.get({
        url: '/admin/notice',
        method: 'GET',
        params: params
    })
}
/**
 * @desc: 删除
 */
export function deleteNoticeData(id?: number) {
    return Request.delete({
        url: "/admin/notice",
        method: "DELETE",
        params: { indexId: id },
    })
}
/**
 * @desc: 新增数据
 */
export function newNoticeData(data: Object) {
    return Request.post({
        url: "/admin/notice",
        method: "POST", 
        data: data,
    })
}
/**
 * @desc: 修改
 */
export function editNoticeData(data: Object) {
    return Request.put({
        url: "/admin/notice",
        method: "PUT", 
        data: data,
    })
}

/**
 * @desc: 获取公告协作人
 */
export function getUserNoticeList(params?: object) {
    return Request.get({
        url: "/admin/user-notice",
        method: "GET",
        ...(params ? params : '')
    })
}

/**
 * @desc: 批量增加公告协作人
 */
export function createUserNotice(data: any) {
    return Request.post({
        url: "/admin/user-notice",
        method: "POST",
        data: data
    })
}

/**
 * @desc: 批量删除公告协作人
 */
export function deleteUserNotice(data: any) {
    return Request.delete({
        url: "/admin/user-notice",
        method: "DELETE",
        data: data
    })
}

/**
 * @desc: 修改
 */
export function editNceUserData(data: Object) {
    return Request.put({
        url: "/admin/user-notice",
        method: "PUT", 
        data: data,
    })
}

